//
//  NSDictionary+Character.m
//  打印字典汉字_7
//
//  Created by lanouhn on 16/7/23.
//  Copyright © 2016年 lanouhn. All rights reserved.
//

#import "NSDictionary+Character.h"

@implementation NSDictionary (Character)
- (NSString *)descriptionWithLocale:(id)locale {
    
    // 接收所有key值
    NSArray *allkeys = [self allKeys];
    
    // 可变字符串,用于下面进行拼接
    NSMutableString *str  = [[NSMutableString alloc] initWithFormat:@"{\t\n"];
    
    // for in 遍历
    for (NSString *key in allkeys) {
        
        id value = self[key]; // 取出所有value值
        
        // 格式化拼接:Format
        [str appendFormat:@"\t \"%@\" = %@,\n",key,value];
    }
    
    [str appendString:@"}"];
    
    return str;
}
@end
